package com.zznj.xzjc.adapter.index;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zznj.xzjc.R;
import com.zznj.xzjc.bean.index.SadsrData;
import com.zznj.xzjc.bean.index.SadwData;
import com.zznj.xzjc.utils.StringUtils;
import com.zznj.xzjc.utils.TimeUtils;

import java.util.HashMap;
import java.util.List;

/**
 * 描述：添加类的描述
 *
 * @author wx5e48d604c2885118
 * @time 2020/4/7
 */
public class SadsrAdapter extends BaseQuickAdapter<SadsrData, BaseViewHolder> {

    public SadsrAdapter(int layoutResId, @Nullable List<SadsrData> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SadsrData item) {
        helper.setText(R.id.title,"共"+item.getCaseNum()+"起相关案件")
                .setText(R.id.xm,"姓         名："+item.getName())
                .setText(R.id.whcd,"文化程度："+StringUtils.toStringForWu(item.getEducationStr()))
                .setText(R.id.zy,"职         业："+ StringUtils.toStringForWu(item.getProfession()))
                .setText(R.id.sfzNo,"身份证号："+item.getIdsNo());
        helper.setImageResource(R.id.xb,"1".equals(item.getSex())?R.mipmap.ic_xingbie_nan:R.mipmap.ic_xingbie_nv);
    }
}
